<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>发布找人找车信息</title>
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/dpl.css" rel="stylesheet">
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/bui.css" rel="stylesheet">
<script src="http://g.tbcdn.cn/fi/bui/jquery-1.8.1.min.js"></script>
<script src="http://g.alicdn.com/bui/seajs/2.3.0/sea.js"></script>
<script src="http://g.alicdn.com/bui/bui/1.1.10/config.js"></script>

</head>
<body>
<div class="doc-content">
 <form id="J_Form" class="form-horizontal" method="post" action="../car/addCar" >
 	<div class="row">
        <div class="panel panel-primary">
          <div class="panel-header clearfix">
            <h3 class="pull-left">发布找人找车信息</h3>
          </div>
          <div class="panel-body">
           
     	     <div class="control-group">
              <label class="control-label">信息类型：</label>
              <div class="controls">
                <select class="input-small" name="type">
                	<option value ="1">找人</option>
                	<option value ="0">找车</option>
                </select>
              </div>
            </div>
     	   
     	   <div class="control-group">
              <label class="control-label">出发地：</label>
              <div class="controls">
                <input type="text" class="input-large" name="startAddress">
              </div>
           </div>
              <div class="control-group">
              <label class="control-label">目的地：</label>
              <div class="controls">
                <input type="text" class="input-large" name="endAddress">
              </div>
           </div>
             </div>
      
            <div class="control-group">
              <label class="control-label">出发时间：</label>
              <div class="controls bui-form-group" data-rules="{dateRange : true}">
                <input type="text" name="faTime" id="timeID" class="calendar calendar-time"  />
              </div>
            </div>
            
            
   			<div class="row">
            <div class="control-group span8">
              <label class="control-label">联系电话：</label>
              <div class="controls">
                <input type="text" name="phone" class="control-text">
              </div>
            </div>
            <div class="control-group span8">
              <label class="control-label">价格：</label>
              <div class="controls">
                <input type="text" name="money" class="control-text" value="面议">
              </div>
            </div>
            <div class="control-group span8">
              <label class="control-label">人数：</label>
              <div class="controls">
                <input type="text" name="size" class="control-text" value="1">
              </div>
            </div>
          </div>
            <div class="control-group">
              <label class="control-label">备注信息：</label>
              <div class="controls  control-row-auto">
                <textarea name="content"  class="control-row4 input-large"></textarea>
              </div>
            </div>
      <div class="row">
        <div class="form-actions offset3">
          <button type="submit" class="button button-primary">保存</button>
          <button type="reset" class="button">重置</button>
        </div>
      </div>  
    </form>

</div>


 
<!-- script start --> 
 <script  type="text/javascript">
  BUI.use('bui/form',function(Form){
          new Form.HForm({
        srcNode : '#J_Form',
        submitType : 'ajax',
        callback : function(data){
          if (data.data)
	        {
	          alert(data.msg);
	          document.getElementById("J_Form").reset()
	        }else
	        {
	          alert(data.msg);
	         }
        }
      }).render();
       });
  
   BUI.use('bui/calendar',function(Calendar){
          var datepicker = new Calendar.DatePicker({
            trigger:'#timeID',
            dateMask : 'yyyy-mm-dd',
            autoRender : true
          }); });
</script>

</body>
</html>